import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router);

// 首页框架
const Main = r => require.ensure([], () => r(require('../pages/homePage/Main')), 'Main');
// 首页
const Home = r => require.ensure([], () => r(require('../pages/homePage/Home')), 'Home');
// 工商联概况页
const Survey = r => require.ensure([], () => r(require('../pages/generalSituation/Survey')), 'Survey');
// 工商联概况子页-工商联简介
const BriefIntroduction = r => require.ensure([], () => r(require('../pages/generalSituation/BriefIntroduction')), 'BriefIntroduction');
// 工商联概况子页-工商联职责
const Duty = r => require.ensure([], () => r(require('../pages/generalSituation/Duty')), 'Duty');
// 工商联概况子页-现任领导
const Leader = r => require.ensure([], () => r(require('../pages/generalSituation/Leader')), 'Leader');
// 工商联概况子页-现任领导
//const PresentLeader = r => require.ensure([], () => r(require('../pages/generalSituation/PresentLeader')), 'PresentLeader');
// 工商联概况子页-机构设置
const InstitutionSetting = r => require.ensure([], () => r(require('../pages/generalSituation/InstitutionSetting')), 'InstitutionSetting');
// 工商联概况子页-商会章程
const ChamberStatute = r => require.ensure([], () => r(require('../pages/generalSituation/ChamberStatute')), 'ChamberStatute');
// 工商联概况子页-历史前沿
const History = r => require.ensure([], () => r(require('../pages/generalSituation/History')), 'History');
// 工商联概况子页-历任领导
const SuccessiveLeaders = r => require.ensure([], () => r(require('../pages/generalSituation/SuccessiveLeaders')), 'SuccessiveLeaders');
// 工商联历任领导的纯文字页面
//const LeaderMan = r => require.ensure([], () => r(require('../pages/generalSituation/LeaderMan')), 'LeaderMan');
// 经贸天地页
const EconomicTrade = r => require.ensure([], () => r(require('../pages/economicTrade/EconomicTrade')), 'EconomicTrade');
// 经贸天地子页-经济合作
const EconomicCooperation = r => require.ensure([], () => r(require('../pages/economicTrade/EconomicCooperation')), 'EconomicCooperation');
// 经贸天地子页-经济成果
const EconomicGain = r => require.ensure([], () => r(require('../pages/economicTrade/EconomicGain')), 'EconomicGain');
// 经贸天地子页-经贸交流
const EconomicTradeExchange = r => require.ensure([], () => r(require('../pages/economicTrade/EconomicTradeExchange')), 'EconomicTradeExchange');
// 经贸天地子页-金融信息
const FinancialInformation = r => require.ensure([], () => r(require('../pages/economicTrade/FinancialInformation')), 'FinancialInformation');
// 新闻详情页面
const NewsInfo = r => require.ensure([], () => r(require('../pages/common/NewsInfo')), 'NewsInfo');
// 会员风采页
const MembersDemeanor = r => require.ensure([], () => r(require('../pages/membersDemeanor/MembersDemeanor')), 'MembersDemeanor');
// 会员风采1
const MembersOne = r => require.ensure([], () => r(require('../pages/membersDemeanor/MembersOne')), 'MembersOne');
// 会员风采2
const MembersTwo = r => require.ensure([], () => r(require('../pages/membersDemeanor/MembersTwo')), 'MembersTwo');
// 会员风采3
const MembersThree = r => require.ensure([], () => r(require('../pages/membersDemeanor/MembersThree')), 'MembersThree');
// 会员风采4
const MembersFour = r => require.ensure([], () => r(require('../pages/membersDemeanor/MembersFour')), 'MembersFour');
// 调研服务页
const ResearchService = r => require.ensure([], () => r(require('../pages/researchService/ResearchService')), 'ResearchService');
// 宣教培训页
const ServiceOne = r => require.ensure([], () => r(require('../pages/researchService/ServiceOne')), 'ServiceOne');
//调研服务1
const ServiceTwo = r => require.ensure([], () => r(require('../pages/researchService/ServiceTwo')), 'ServiceTwo');
// 调研服务2
const ServiceThree = r => require.ensure([], () => r(require('../pages/researchService/ServiceThree')), 'ServiceThree');
// 调研服务3
const ServiceFour = r => require.ensure([], () => r(require('../pages/researchService/ServiceFour')), 'ServiceFour');
// 调研服务4
const TeachingEducation = r => require.ensure([], () => r(require('../pages/teachingEducation/TeachingEducation')), 'TeachingEducation');
// 宣教服务1
const TeachingOne = r => require.ensure([], () => r(require('../pages/teachingEducation/TeachingOne')), 'TeachingOne');
// 宣教服务1
const TeachingTwo = r => require.ensure([], () => r(require('../pages/teachingEducation/TeachingTwo')), 'TeachingTwo');
// 宣教服务1
const TeachingThree = r => require.ensure([], () => r(require('../pages/teachingEducation/TeachingThree')), 'TeachingThree');
// 宣教服务1
const TeachingFour = r => require.ensure([], () => r(require('../pages/teachingEducation/TeachingFour')), 'TeachingFour');
// 对外联络页
const ExternalLiaison = r => require.ensure([], () => r(require('../pages/externalLiaison/ExternalLiaison')), 'ExternalLiaison');
// 对外联络1
const ExternalOne = r => require.ensure([], () => r(require('../pages/externalLiaison/ExternalOne')), 'ExternalOne');
// 对外联络1
const ExternalTwo = r => require.ensure([], () => r(require('../pages/externalLiaison/ExternalTwo')), 'ExternalTwo');
// 对外联络1
const ExternalThree = r => require.ensure([], () => r(require('../pages/externalLiaison/ExternalThree')), 'ExternalThree');
// 对外联络1
const ExternalFour = r => require.ensure([], () => r(require('../pages/externalLiaison/ExternalFour')), 'ExternalFour');
// 法律维权页
const LegalProtection = r => require.ensure([], () => r(require('../pages/legalProtection/LegalProtection')), 'LegalProtection');
// 法律维权1
const LegalOne = r => require.ensure([], () => r(require('../pages/legalProtection/LegalOne')), 'LegalOne');
// 法律维权2
const LegalTwo = r => require.ensure([], () => r(require('../pages/legalProtection/LegalTwo')), 'LegalTwo');
// 法律维权3
const LegalThree = r => require.ensure([], () => r(require('../pages/legalProtection/LegalThree')), 'LegalThree');
// 法律维权4
const LegalFour= r => require.ensure([], () => r(require('../pages/legalProtection/LegalFour')), 'LegalFour');
// 党建园地页
const PartybuildingGarden = r => require.ensure([], () => r(require('../pages/partybuildingGarden/PartybuildingGarden')), 'PartybuildingGarden');
// 党建园地1
const PartyOne = r => require.ensure([], () => r(require('../pages/partybuildingGarden/PartyOne')), 'PartyOne');
// 党建园地2
const PartyTwo = r => require.ensure([], () => r(require('../pages/partybuildingGarden/PartyTwo')), 'PartyTwo');
// 党建园地3
const PartyThree = r => require.ensure([], () => r(require('../pages/partybuildingGarden/PartyThree')), 'PartyThree');
// 党建园地4
const PartyFour = r => require.ensure([], () => r(require('../pages/partybuildingGarden/PartyFour')), 'PartyFour');
// 新闻资讯页
const NewsbuildingGarden = r => require.ensure([], () => r(require('../pages/newsPage/NewsbuildingGarden')), 'NewsbuildingGarden');
// 新闻资讯
const NewsOne = r => require.ensure([], () => r(require('../pages/newsPage/NewsOne')), 'NewsOne');
// 基层动态页
const Baseinfo = r => require.ensure([], () => r(require('../pages/Baseinfo/Baseinfo')), 'Baseinfo');
// 工商联组织
const BaseinfoOne = r => require.ensure([], () => r(require('../pages/Baseinfo/BaseinfoOne')), 'BaseinfoOne');
// 商会组织
const BaseinfoTwo = r => require.ensure([], () => r(require('../pages/Baseinfo/BaseinfoTwo')), 'BaseinfoTwo');
// 会员供求服务页
const membersbuildingGarden = r => require.ensure([], () => r(require('../pages/membersPage/membersbuildingGarden')), 'membersbuildingGarden');
// 会员供求服务1
const membersOne = r => require.ensure([], () => r(require('../pages/membersPage/membersOne')), 'membersOne');
// 预决算公告页
const ForecastbuildingGarden = r => require.ensure([], () => r(require('../pages/ForecastPage/ForecastbuildingGarden')),'ForecastbuildingGarden');
// 预算决算公告
const ForecastOne = r => require.ensure([], () => r(require('../pages/ForecastPage/ForecastOne')), 'ForecastOne');
// 吉商专栏页
const ColumnbuildingGarden = r => require.ensure([], () => r(require('../pages/ColumnPage/ColumnbuildingGarden')), 'ColumnbuildingGarden');
// 吉商专栏
const ColumnOne = r => require.ensure([], () => r(require('../pages/ColumnPage/ColumnOne')), 'ColumnOne');
// 脱贫攻坚页
const PovertybuildingGarden = r => require.ensure([], () => r(require('../pages/PovertyPage/PovertybuildingGarden')), 'PovertybuildingGarden');
// 脱贫攻坚
const PovertyOne = r => require.ensure([], () => r(require('../pages/PovertyPage/PovertyOne')), 'PovertyOne');
// 政策法规页
const PolicybuildingGarden = r => require.ensure([], () => r(require('../pages/PolicyPage/PolicybuildingGarden')), 'PolicybuildingGarden');
// 政策法规
const PolicyOne = r => require.ensure([], () => r(require('../pages/PolicyPage/PolicyOne')), 'PolicyOne');
// 资料下载页
const DownloadbuildingGarden = r => require.ensure([], () => r(require('../pages/DownloadPage/DownloadbuildingGarden')), 'DownloadbuildingGarden');
// 资料下载
const DownloadOne = r => require.ensure([], () => r(require('../pages/DownloadPage/DownloadOne')), 'DownloadOne');
// 最新公告页
const AnnouncementbuildingGarden = r => require.ensure([], () => r(require('../pages/AnnouncementPage/AnnouncementbuildingGarden')), 'AnnouncementbuildingGarden');
// 最新公告
const AnnouncementOne = r => require.ensure([], () => r(require('../pages/AnnouncementPage/AnnouncementOne')), 'AnnouncementOne');


export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/Home',
      component: Main,
      children: [{
        path: 'Home',
        component: Home
      },
      {
        path: 'Survey',
        component: Survey,
        redirect: '/Survey/BriefIntroduction',
        children: [
          {
            path: 'BriefIntroduction',
            name: 'BriefIntroduction',
            component: BriefIntroduction
          },
          {
            path: 'Duty',
            name: 'Duty',
            component: Duty
          },
          {
            path: 'Leader',
            name: 'Leader',
            component: Leader
          },
        //  {
         //   path: 'PresentLeader',
         //   name: 'PresentLeader',
         //   component: PresentLeader
         // },
          {
            path: 'InstitutionSetting',
            name: 'InstitutionSetting',
            component: InstitutionSetting
          },
          {
            path: 'ChamberStatute',
            name: 'ChamberStatute',
            component: ChamberStatute
          },
          {
            path: 'History',
            name: 'History',
            component: History,
            children: [
              {
                path: 'NewsInfo',
                name: 'Hist-in',
                component: NewsInfo
              }
            ]
          },
          {
            path: 'SuccessiveLeaders',
            name: 'SuccessiveLeaders',
            component: SuccessiveLeaders
          },
        ]
      },
      {
        path: 'EconomicTrade',
        component: EconomicTrade,
        redirect: '/EconomicTrade/FinancialInformation',
        children: [
          {
            path: 'FinancialInformation',
            name: 'FinancialInformation',
            component: FinancialInformation,
            children: [
              {
                path: 'NewsInfo',
                name: 'Financial-in',
                component: NewsInfo
              }
            ]
          },
          {
            path: 'EconomicTradeExchange',
            name: 'EconomicTradeExchange',
            component: EconomicTradeExchange,
            children: [
              {
                path: 'NewsInfo',
                name: 'Trade-ex',
                component: NewsInfo
              }
            ]
          },
          {
            path: 'EconomicGain',
            name: 'EconomicGain',
            component: EconomicGain,
            children: [
              {
                path: 'NewsInfo',
                name: 'Gain-eo',
                component: NewsInfo
              }
            ]
          },
          {
            path: 'EconomicCooperation',
            name: 'EconomicCooperation',
            component: EconomicCooperation,
            children: [
              {
                path: 'NewsInfo',
                name: 'Cooperation-ec',
                component: NewsInfo
              }
            ]
          }
        ]
      },
      {
        path: 'MembersDemeanor',
        // name: 'MembersDemeanor',
        component: MembersDemeanor,
        redirect: '/MembersDemeanor/MembersOne',
        children: [
          {
            path: 'MembersOne',
            name: 'MembersOne',
            component: MembersOne,
            children: [
              {
                path: 'NewsInfo',
                name: 'MemOne-in',
                component: NewsInfo
              }
            ]
          },
          {
            path: 'MembersTwo',
            name: 'MembersTwo',
            component: MembersTwo,
            children: [
              {
                path: 'NewsInfo',
                name: 'MemTwo-ex',
                component: NewsInfo
              }
            ]
          },
          {
            path: 'MembersThree',
            name: 'MembersThree',
            component: MembersThree,
            children: [
              {
                path: 'NewsInfo',
                name: 'MemThree-eo',
                component: NewsInfo
              }
            ]
          },
          {
            path: 'MembersFour',
            name: 'MembersFour',
            component: MembersFour,
            children: [
              {
                path: 'NewsInfo',
                name: 'MemFour-ec',
                component: NewsInfo
              }
            ]
          }
        ]
      },
      {
        path: 'ResearchService',
        name: 'ResearchService',
        component: ResearchService,
        redirect: '/ResearchService/ServiceOne',
        children: [
          {
           path: 'ServiceOne',
           name: 'ServiceOne',
           component: ServiceOne,
            children: [
               {
                 path: 'NewsInfo',
                 name: 'SerOne-in',
                 component: NewsInfo
               }
             ]
           },
          {
            path: 'ServiceTwo',
            name: 'ServiceTwo',
            component: ServiceTwo,
            children: [
              {
                path: 'NewsInfo',
                name: 'SerTwo-ex',
                component: NewsInfo
              }
            ]
          },
          {
            path: 'ServiceThree',
            name: 'ServiceThree',
            component: ServiceThree,
            children: [
              {
                path: 'NewsInfo',
                name: 'SerThree-eo',
                component: NewsInfo
              }
            ]
          },
          {
            path: 'ServiceFour',
            name: 'ServiceFour',
            component: ServiceFour,
            children: [
              {
                path: 'NewsInfo',
                name: 'SerFour-ec',
                component: NewsInfo
              }
            ]
          }
        ]
      },
      {
        path: 'TeachingEducation',
        name: 'TeachingEducation',
        component: TeachingEducation,
        redirect: '/TeachingEducation/TeachingOne',
         children: [
           {
          path: 'TeachingOne',
          name :'TeachingOne',
          component: TeachingOne,
             children: [
               {
                 path: 'NewsInfo',
                 name: 'TeachOne-in',
                 component: NewsInfo
               }
             ]
          },
           {
             path: 'TeachingTwo',
             name :'TeachingTwo',
             component: TeachingTwo,
             children: [
               {
                 path: 'NewsInfo',
                 name: 'TeachTwo-ex',
                 component: NewsInfo
               }
             ]
           },
           {
             path: 'TeachingThree',
             name :'TeachingThree',
             component: TeachingThree,
             children: [
               {
                 path: 'NewsInfo',
                 name: 'TeachThree-eo',
                 component: NewsInfo
               }
             ]
           },
           {
             path: 'TeachingFour',
             name :'TeachingFour',
             component: TeachingFour,
             children: [
               {
                 path: 'NewsInfo',
                 name: 'TeachFour-ec',
                 component: NewsInfo
               }
             ]
           }
         ]
      },
      {
        path: 'ExternalLiaison',
        name: 'ExternalLiaison',
        component: ExternalLiaison,
        redirect: '/ExternalLiaison/ExternalOne',
         children: [
           {
           path: 'ExternalOne',
           name:'ExternalOne',
           component: ExternalOne,
             children: [
               {
                 path: 'NewsInfo',
                 name: 'ExtOne-in',
                 component: NewsInfo
               }
             ]
          },
           {
             path: 'ExternalTwo',
             name:'ExternalTwo',
             component: ExternalTwo,
             children: [
               {
                 path: 'NewsInfo',
                 name: 'ExtTwo-ex',
                 component: NewsInfo
               }
             ]
           },
           {
             path: 'ExternalThree',
             name:'ExternalThree',
             component: ExternalThree,
             children: [
               {
                 path: 'NewsInfo',
                 name: 'ExtThree-eo',
                 component: NewsInfo
               }
             ]
           },
           {
             path: 'ExternalFour',
             name:'ExternalFour',
             component: ExternalFour,
             children: [
               {
                 path: 'NewsInfo',
                 name: 'ExtFour-ec',
                 component: NewsInfo
               }
             ]
           }
         ]
      },
      {
        path: 'LegalProtection',
        name: 'LegalProtection',
        component: LegalProtection,
        redirect: '/LegalProtection/LegalOne',
        children: [
          {
           path: 'LegalOne',
           name:'LegalOne',
          component: LegalOne,
            children: [
              {
                path: 'NewsInfo',
                name: 'LeOne-in',
                component: NewsInfo
              }
            ]
          },
          {
            path: 'LegalTwo',
            name:'LegalTwo',
            component: LegalTwo,
            children: [
              {
                path: 'NewsInfo',
                name: 'LeTwo-ex',
                component: NewsInfo
              }
            ]
          },
          {
            path: 'LegalThree',
            name:'LegalThree',
            component: LegalThree,
            children: [
              {
                path: 'NewsInfo',
                name: 'LeThree-eo',
                component: NewsInfo
              }
            ]
          },
          {
            path: 'LegalFour',
            name:'LegalFour',
            component: LegalFour,
            children: [
              {
                path: 'NewsInfo',
                name: 'LeFour-ec',
                component: NewsInfo
              }
            ]
          }
        ]
      },
      {
        path: 'PartybuildingGarden',
        name: 'PartybuildingGarden',
        component: PartybuildingGarden,
        redirect: '/PartybuildingGarden/PartyOne',
        children: [
          {
          path: 'PartyOne',
          name:'PartyOne',
          component: PartyOne,
            children: [
              {
                path: 'NewsInfo',
                name: 'ParOne-in',
                component: NewsInfo
              }
            ]
          },
          {
            path: 'PartyTwo',
            name:'PartyTwo',
            component: PartyTwo,
            children: [
              {
                path: 'NewsInfo',
                name: 'ParTwo-ex',
                component: NewsInfo
              }
            ]
          },
          {
            path: 'PartyThree',
            name:'PartyThree',
            component: PartyThree,
            children: [
              {
                path: 'NewsInfo',
                name: 'ParThree-eo',
                component: NewsInfo
              }
            ]
          },
          {
            path: 'PartyFour',
            name:'PartyFour',
            component: PartyFour,
            children: [
              {
                path: 'NewsInfo',
                name: 'ParFour-ec',
                component: NewsInfo
              }
            ]
          }
        ]
      },
        {
          path: 'NewsbuildingGarden',
          name: 'NewsbuildingGarden',
          component: NewsbuildingGarden,
          redirect: '/NewsbuildingGarden/NewsOne',
          children: [
            {
              path: 'NewsOne',
              name:'NewsOne',
              component: NewsOne,
              children: [
                {
                  path: 'NewsInfo',
                  name: 'NsOne-in',
                  component: NewsInfo
                }
              ]
            }
          ]
        } ,
        {
          path: 'membersbuildingGarden',
          name: 'membersbuildingGarden',
          component: membersbuildingGarden,
          redirect: '/membersbuildingGarden/membersOne',
          children: [
            {
              path: 'membersOne',
              name:'membersOne',
              component: membersOne,
              children: [
                {
                  path: 'NewsInfo',
                  name: 'memOne-in',
                  component: NewsInfo
                }
              ]
            }
          ]
        } ,
        {
          path: 'ForecastbuildingGarden',
          name: 'ForecastbuildingGarden',
          component: ForecastbuildingGarden,
          redirect: '/ForecastbuildingGarden/ForecastOne',
          children: [
            {
              path: 'ForecastOne',
              name:'ForecastOne',
              component: ForecastOne,
              children: [
                {
                  path: 'NewsInfo',
                  name: 'ForeOne-in',
                  component: NewsInfo
                }
              ]
            }
          ]
        } ,
        {
          path: 'ColumnbuildingGarden',
          name: 'ColumnbuildingGarden',
          component: ColumnbuildingGarden,
          redirect: '/ColumnbuildingGarden/ColumnOne',
          children: [
            {
              path: 'ColumnOne',
              name:'ColumnOne',
              component: ColumnOne,
              children: [
                {
                  path: 'NewsInfo',
                  name: 'ColOne-in',
                  component: NewsInfo
                }
              ]
            }
          ]
        } ,
        {
          path: 'PovertybuildingGarden',
          name: 'PovertybuildingGarden',
          component: PovertybuildingGarden,
          redirect: '/PovertybuildingGarden/PovertyOne',
          children: [
            {
              path: 'PovertyOne',
              name:'PovertyOne',
              component: PovertyOne,
              children: [
                {
                  path: 'NewsInfo',
                  name: 'PovOne-in',
                  component: NewsInfo
                }
              ]
            }
          ]
        } ,
        {
          path: 'PolicybuildingGarden',
          name: 'PolicybuildingGarden',
          component: PolicybuildingGarden,
          redirect: '/PolicybuildingGarden/PolicyOne',
          children: [
            {
              path: 'PolicyOne',
              name:'PolicyOne',
              component: PolicyOne,
              children: [
                {
                  path: 'NewsInfo',
                  name: 'PolOne-in',
                  component: NewsInfo
                }
              ]
            }
          ]
        } ,
        {
          path: 'DownloadbuildingGarden',
          name: 'DownloadbuildingGarden',
          component: DownloadbuildingGarden,
          redirect: '/DownloadbuildingGarden/DownloadOne',
          children: [
            {
              path: 'DownloadOne',
              name:'DownloadOne',
              component: DownloadOne,
              children: [
                {
                  path: 'NewsInfo',
                  name: 'DowOne-in',
                  component: NewsInfo
                }
              ]
            }
          ]
        } ,
        {
          path: 'AnnouncementbuildingGarden',
          name: 'AnnouncementbuildingGarden',
          component: AnnouncementbuildingGarden,
          redirect: '/AnnouncementbuildingGarden/AnnouncementOne',
          children: [
            {
              path: 'AnnouncementOne',
              name:'AnnouncementOne',
              component: AnnouncementOne,
              children: [
                {
                  path: 'NewsInfo',
                  name: 'AnnOne-in',
                  component: NewsInfo
                }
              ]
            }
          ]
        } ,
        {
          path: 'Baseinfo',
          name: 'Baseinfo',
          component: Baseinfo,
          redirect: '/Baseinfo/BaseinfoOne',
          children: [
            {
              path: 'BaseinfoOne',
              name:'BaseinfoOne',
              component: BaseinfoOne,
              children: [
                {
                  path: 'NewsInfo',
                  name: 'BasOne-in',
                  component: NewsInfo
                }
              ]
            },
            {
              path: 'BaseinfoTwo',
              name:'BaseinfoTwo',
              component: BaseinfoTwo,
              children: [
                {
                  path: 'NewsInfo',
                  name: 'BasTwo-ex',
                  component: NewsInfo
                }
              ]
            }
          ]
        }
      ]
    }
  ]
})
